import { EntityMapPoint } from "./EntityMapPoint";
import { ToolTipsManager } from "../../../../../com/mui/manager/ToolTipsManager";
import { EForce } from "../../../../../Message/Public/EForce";
import { GlobalClass } from "../../../../../com/mui/core/GlobalClass";
import { ImagesConst } from "../../../resource/ImagesConst";
import { EEntityType } from "../../../../../Message/Public/EEntityType";
import { EntityUtil } from "../../../scene/layer/utils/EntityUtil";
//class EntityAttachedSoulBattlefieldPoint
    
    export  class EntityAttachedSoulBattlefieldPoint extends EntityMapPoint
    {
        constructor()
        {
            super();
            this.mouseEnabled = true;
            ToolTipsManager.register(this);
            return;
        }

        public setUpdateObj(arg1: Object): void
        {
            this.updateObj(arg1);
            return;
        }

        protected /* override */ updatePointView(): void
        {
            if (_entityPoint) 
            {
                var loc1=_entityPoint.relationType;
                switch (loc1) 
                {
                    case EForce._EForceThree:
                    {
                        _bitMap.bitmapData = GlobalClass.getBitmapData(ImagesConst.SilverPoint);
                        break;
                    }
                    case EForce._EForceFour:
                    {
                        _bitMap.bitmapData = GlobalClass.getBitmapData(ImagesConst.GoldenPoint);
                        break;
                    }
                }
                _bitMap.x = (-_bitMap.width) / 2;
                _bitMap.y = (-_bitMap.height) / 2;
            }
            return;
        }

        public /* override */ updateData(arg1: Object=null, arg2: uint=16711680, arg3: number=1.5, arg4: number=1): void
        {
            super.updateData(arg1, arg2, arg3, arg4);
            ToolTipsManager.register(this);
            return;
        }

        public /* override */ get toolTipData()
        {
            if (entityId && !(entityId.type == EEntityType._EEntityTypeBoss)) 
            {
                return EntityUtil.getProxyName(_entityPoint.entityId) + _entityPoint.name;
            }
            return "";
        }
    }
